﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using GalaSoft.MvvmLight.Messaging;
using HP.Cachalote.DataModels;
using HP.Cachalote.WPF.ViewModel;
using HP.Cachalote.WPF.Shared;

namespace HP.Cachalote.WPF.UserControls
{
    /// <summary>
    /// Interaction logic for UnfinishedTodoItemListUserControl.xaml
    /// </summary>
    public partial class UnfinishedTodoItemTreeViewUserControl : UserControlBase
    {
        public UnfinishedTodoItemTreeViewUserControl()
        {
            InitializeComponent();

            Messenger.Default.Register<DialogMessage>(this, UnfinishedTodoItemTreeViewModel.DeleteItemConfirmMessageToken, dialog =>
                {
                    //var confirmResult = MessageBox.Show(dialog.Content, dialog.Caption, dialog.Button, dialog.Icon);

                    var dialogWindow = new DialogWindow(dialog.Content);
                    dialogWindow.ShowDialog();

                    var confirmResult = dialogWindow.Result;
                    dialog.ProcessCallback(confirmResult);
                });
        }
    }
}
